/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_Usart6.h
* $Date:        13-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_Usart6_H
#define __XiaoFei_Usart6_H

#define Usart6_AddRx
#define Usart6_GPIO_TX			        GPIOC
#define Usart6_Pin_TX		            GPIO_Pin_6
#define Usart6_BaudRate		            9600

#ifdef Usart6_AddRx
    #define Usart6_GPIO_RX			    GPIOC
	#define Usart6_Pin_RX				GPIO_Pin_7
	#define USART6_Group				NVIC_PriorityGroup_2
	#define USART6_ITPre				1
	#define USART6_ITSub				1
#endif

/* 
* @function: 	Usart6_Init
*/
void Usart6_Init(void);

/* 
* @function: 	Usart6_SendByte
* @parameter:	[in] Byte					 The byte will be send.
*/
void Usart6_SendByte(unsigned char Byte);

/* 
* @function: 	Usart6_Printf
* @parameter:	[in] format					 The parameter will be send in Usart6_Printf.
*/
void Usart6_Printf(char *format, ...);

#ifdef Usart6_AddRx
/* 
* @function: 	USART6_IRQHandler
* @callback:	The function will be callback when the Usart6 receive the data.
*/
void USART6_IRQHandler(void);
#endif

#endif
